require(rddtools)
require(AER)
require(tidyverse)
require(rdrobust)
source('Habit_source.R', echo=TRUE)
states = tolower(c("AL", "AR", "CA", "CT", "FL", "IL", "IN", "KS", "KY", "MA", "MD",
                   "MO",
                   "NE", "NV", "NY", "OH", "OR", "PA", "RI", "SC", "TN", "TX", "VA", "WA",
                   "WV"))


for(state in states){
    for(bw in seq(14, 352,  by = 14)){
      file = paste0('rdd_',state,'.Rdata')
    load(file)
    source('primary_analysis_rdd_bw.R')
      print(bw)
    }
    print(state)
}



